//package com.example.mydemo;
//
//import ws.schild.jave.*;
//
//import java.io.File;
//
//import it.sauronsoftware.jave.AudioAttributes;
//import it.sauronsoftware.jave.Encoder;
//import it.sauronsoftware.jave.EncoderException;
//import it.sauronsoftware.jave.EncodingAttributes;
//import it.sauronsoftware.jave.VideoAttributes;
//
///**
// * @author tangpengcheng
// * @description：压缩时评
// * @date 2020-07-13 15:44
// */
//public class Yasuo {
//
//
//        public static void main(String[] args) {
//            File source = new File("C:\\Users\\12200\\Desktop\\新建文件夹\\自我介绍视频.mp4");
//            File target = new File("C:\\Users\\12200\\Desktop\\新建文件夹\\自我介绍视频2.mp4");
//            try {
//
//                AudioAttributes audio = new AudioAttributes();
//                audio.setCodec("libmp3lame");
//                audio.setBitRate(new Integer(56000));
//                audio.setChannels(new Integer(1));
//                audio.setSamplingRate(new Integer(22050));
//                VideoAttributes video = new VideoAttributes();
//                video.setCodec("mpeg4");
//                video.setBitRate(new Integer(3200000));
//                video.setFrameRate(new Integer(10));
//                EncodingAttributes attrs = new EncodingAttributes();
//                attrs.setFormat("mp4");
//                attrs.setAudioAttributes(audio);
//                attrs.setVideoAttributes(video);
//                Encoder encoder = new Encoder();
//                encoder.encode(source, target, attrs);
//            } catch (EncoderException e) {
//                e.printStackTrace();
//            }
//        }
//}
